package com.guowei.jiecloudbackstage.quickbooking.controller;


import com.guowei.jiecloudbackstage.common.api.vo.Result;
import com.guowei.jiecloudbackstage.quickbooking.entity.Order;
import com.guowei.jiecloudbackstage.quickbooking.service.IOrderService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ym
 * @since 2021-07-06
 */
@RestController
@RequestMapping("/quickbooking/order")
@Api(tags = "Order客户快速预订 接口")
public class OrderController {

    @Autowired
    private IOrderService iOrderService;

    @RequestMapping("/api/getAll")
    @ResponseBody
    public Result getAllAdmin() {
        return iOrderService.getAll();
    }

    @PostMapping("/api/addAdmin")
    @ResponseBody
    public Result addAdmin(@RequestBody Order order) {
        return iOrderService.insertOrder(order);
    }




}
